/**
 * 
 */
(function ($) {
	var value=$('#the_value').attr('value');
	var userid=$('input[name=userid]').attr('value');
	$.ajax({
		url:'/WDDXSERVER/login/loginWithPc',
		dataType:'text',
		type:'GET',
		data:{userid:userid},
		success:function(data){
			var d = eval('('+data+')');
			methods.showLcol(d);
			 if(value=='积分记录'||value=='赚积分'||value=='花积分'||value=='规则和说明')
				 $('li:contains("'+value+'")').addClass('selected').parents('ul.the_second_ul').show();
			 else
			    $('li:contains("'+value+'")').addClass('selected');
			 $('div.left-ul a#points_control').click(function(){
				 $('div.left-ul li').removeClass('selected');
				 $(this).find('li').addClass('selected')
				 $(this).next().toggle('fast');
				 return false;
			 });
			 $('div.left-ul a').click(function(event){
				 event.stopPropagation();
			 });
			 
		}
	});
	var methods ={
		showLcol :function(content){
			var html = '<div class="container-maxtx " style="height:8em">'
				        		+'<img src="'+content.headphoto+'" width="100%" height="100%"/>'
							+'</div>'
							+'<div class="left-ul">'
								+'<ul>'
									+'<a href="/WDDXSERVER/html/personal_center/own_info.jsp">'+'<li>'+"个人资料"+'</li>'+'</a>'
									+'<a href="/WDDXSERVER/html/personal_center/share.jsp">'+'<li>'+"我的分享"+'</li>'+'</a>'
									+'<a href="#" id="points_control" >'+'<li>'+"积分管理"+'</li>'+'</a>'
									+'<ul class="the_second_ul"><a href="/WDDXSERVER/html/personal_center/point_notes.jsp">'+'<li>'+" >>积分记录"+'</li>'+'</a>'
									+'<a href="/WDDXSERVER/html/personal_center/make_points.jsp">'+'<li ">'+" >>赚积分"+'</li>'+'</a>'
									+'<a href="/WDDXSERVER/html/personal_center/use_points.jsp">'+'<li>'+" >>花积分"+'</li>'+'</a>'
									+'<a href="/WDDXSERVER/html/personal_center/rule_comment.jsp">'+'<li>'+" >>规则和说明"+'</li>'+'</a></ul>'
									+'<a href="/WDDXSERVER/html/personal_center/message.jsp">'+'<li>'+"消息"+'</li>'+'</a>'
								+'</ul>'
							+'</div>';
	var dom=$(".the_lcontainer").append(html);
		}
	};
})(jQuery);